data: lv_adjustment type i, lv_repid like sy-repid, lv_dynnr like sy-dynnr, lv_ret(1). * initialization of control variables lv_repid = sy-repid. lv_dynnr = sy-dynnr. noflush = true. * create custom container object in dynpro create object textedit_custom_container exporting container_name = 'EDITOR_CUSTOM_CONTROL' exceptions cntl_error = 1 cntl_system_error = 2 create_error = 3 lifetime_error = 4 lifetime_dynpro_dynpro_link = 5. if sy-subrc <> 0. message e101. endif. clear: word_error. “<= * check if Word must be used if oi_ed_checked eq false or word_error eq true. oi_editor = false. word_error = false. try. call function 'NLS_WORD_ENABLE' exporting langu = language importing ex_oi_editor = oi_editor. catch cx_sy_dyn_call_illegal_func. endtry. oi_ed_checked = true. endif. clear: oi_editor, “<= word_error. “<= if oi_editor = true. try. create object word_editor exporting editor_container = textedit_custom_container toolbar_visible = true. catch cx_word_sapscript_editor. * message e101. * screen_invisible 'EDITOR_CUSTOM_CONTROL'. endtry. * TODO Error handling else. " PC Editor * create editor object and link the control to the custom container create object text_editor exporting parent = textedit_custom_container caption_list = g_appl_captionlist use_caption = g_appl_use_caption * lifetime = * style = exceptions error_cntl_create = 1 others = 2. if sy-subrc <> 0. message e101. endif. * Set drop handler for editor set handler h_application->handle_symbol_drop for text_editor. endif. return. “<=